package Articulo.src.view;



import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.GridLayout;
import javax.swing.JLabel;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.Component;
import javax.swing.JTextPane;
import javax.swing.SwingConstants;
import java.awt.Font;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class confirmAdd extends JDialog {

	private final JPanel contentPanel = new JPanel();

	/**
	 * Launch the application.
	 */
	//public static void main(String[] args) {
		//try {
			//confirmAdd dialog = new confirmAdd();
			//dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			//dialog.setVisible(true);
	//	} catch (Exception e) {
		//	e.printStackTrace();
		//}
//	}
/*
	/**
	 * Create the dialog.
	 */
	
	public confirmAdd(String n, int p, String cat, String ing, String desc) {
		
		this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		this.setTitle("Confirmar");
		
		getContentPane().setLayout(new BorderLayout());
		
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		GridBagLayout gbl_contentPanel = new GridBagLayout();
		gbl_contentPanel.columnWidths = new int[] {15, 0, 0, 0, 0, 60};
		gbl_contentPanel.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0};
		gbl_contentPanel.columnWeights = new double[]{0.0, 0.0, 0.0, 1.0, 0.0, 0.0};
		gbl_contentPanel.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, Double.MIN_VALUE};
		contentPanel.setLayout(gbl_contentPanel);
		{
			JLabel lblInformacionNuevoProducto = new JLabel("Informacion Nuevo Producto");
			lblInformacionNuevoProducto.setFont(new Font("Lucida Grande", Font.BOLD, 15));
			GridBagConstraints gbc_lblInformacionNuevoProducto = new GridBagConstraints();
			gbc_lblInformacionNuevoProducto.gridwidth = 3;
			gbc_lblInformacionNuevoProducto.insets = new Insets(0, 0, 5, 5);
			gbc_lblInformacionNuevoProducto.gridx = 2;
			gbc_lblInformacionNuevoProducto.gridy = 1;
			contentPanel.add(lblInformacionNuevoProducto, gbc_lblInformacionNuevoProducto);
		}
		{
			JLabel lblNombre = new JLabel("Nombre");
			lblNombre.setHorizontalAlignment(SwingConstants.LEFT);
			GridBagConstraints gbc_lblNombre = new GridBagConstraints();
			gbc_lblNombre.anchor = GridBagConstraints.WEST;
			gbc_lblNombre.insets = new Insets(0, 0, 5, 5);
			gbc_lblNombre.gridx = 1;
			gbc_lblNombre.gridy = 3;
			contentPanel.add(lblNombre, gbc_lblNombre);
		}
		{
			JLabel lblNom = new JLabel(n);
			
			GridBagConstraints gbc_lblNom = new GridBagConstraints();
			gbc_lblNom.insets = new Insets(0, 0, 5, 5);
			gbc_lblNom.gridx = 3;
			gbc_lblNom.gridy = 3;
			contentPanel.add(lblNom, gbc_lblNom);
		}
		{
			JLabel Categoria = new JLabel("Categoria");
			Categoria.setHorizontalAlignment(SwingConstants.LEFT);
			GridBagConstraints gbc_Categoria = new GridBagConstraints();
			gbc_Categoria.anchor = GridBagConstraints.WEST;
			gbc_Categoria.insets = new Insets(0, 0, 5, 5);
			gbc_Categoria.gridx = 1;
			gbc_Categoria.gridy = 4;
			contentPanel.add(Categoria, gbc_Categoria);
		}
		{
			JLabel lblCat = new JLabel(cat);
			GridBagConstraints gbc_lblCat = new GridBagConstraints();
			gbc_lblCat.insets = new Insets(0, 0, 5, 5);
			gbc_lblCat.gridx = 3;
			gbc_lblCat.gridy = 4;
			contentPanel.add(lblCat, gbc_lblCat);
		}
		{
			JLabel lblIngredientes = new JLabel("Ingredientes");
			lblIngredientes.setHorizontalAlignment(SwingConstants.LEFT);
			GridBagConstraints gbc_lblIngredientes = new GridBagConstraints();
			gbc_lblIngredientes.insets = new Insets(0, 0, 5, 5);
			gbc_lblIngredientes.gridx = 1;
			gbc_lblIngredientes.gridy = 5;
			contentPanel.add(lblIngredientes, gbc_lblIngredientes);
		}
		{
			JLabel lblIng = new JLabel(ing);
			GridBagConstraints gbc_lblIng = new GridBagConstraints();
			gbc_lblIng.insets = new Insets(0, 0, 5, 5);
			gbc_lblIng.gridx = 3;
			gbc_lblIng.gridy = 5;
			contentPanel.add(lblIng, gbc_lblIng);
		}
		{
			JLabel lblPrecio = new JLabel("Precio");
			lblPrecio.setHorizontalAlignment(SwingConstants.LEFT);
			GridBagConstraints gbc_lblPrecio = new GridBagConstraints();
			gbc_lblPrecio.anchor = GridBagConstraints.WEST;
			gbc_lblPrecio.insets = new Insets(0, 0, 5, 5);
			gbc_lblPrecio.gridx = 1;
			gbc_lblPrecio.gridy = 6;
			contentPanel.add(lblPrecio, gbc_lblPrecio);
		}
		{
			Integer pr = new Integer(p);
			JLabel lblP = new JLabel(pr.toString());
			GridBagConstraints gbc_lblP = new GridBagConstraints();
			gbc_lblP.insets = new Insets(0, 0, 5, 5);
			gbc_lblP.gridx = 3;
			gbc_lblP.gridy = 6;
			contentPanel.add(lblP, gbc_lblP);
		}
		{
			JLabel lblDesc = new JLabel(desc);
			GridBagConstraints gbc_lblDesc = new GridBagConstraints();
			gbc_lblDesc.insets = new Insets(0, 0, 5, 5);
			gbc_lblDesc.gridx = 3;
			gbc_lblDesc.gridy = 7;
			contentPanel.add(lblDesc, gbc_lblDesc);
		}
		{
			JLabel lblDescripcion = new JLabel("Descripcion");
			GridBagConstraints gbc_lblDescripcion = new GridBagConstraints();
			gbc_lblDescripcion.insets = new Insets(0, 0, 5, 5);
			gbc_lblDescripcion.gridx = 1;
			gbc_lblDescripcion.gridy = 7;
			contentPanel.add(lblDescripcion, gbc_lblDescripcion);
		}
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("Confirmar");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancelar");
				cancelButton.addMouseListener(new MouseAdapter() {
					@Override
					public void mouseClicked(MouseEvent arg0) {
						dispose();
					}
				});
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
	}

}
